<?php

namespace Biz\pockets\constInterface;

use Biz\model\brandRights\BrandRightsSource as mBrandRightsSource;

interface BrandLevel
{
    #品牌等级
    const BRAND_LV_0 = 0;
    const BRAND_LV_1 = 1;
    const BRAND_LV_2 = 2;
    const BRAND_LV_3 = 3;
    const BRAND_LV_4 = 4;
    const BRAND_LV_5 = 5;
    const BRAND_LV_6 = 6;
    const BRAND_LV_7 = 7;

    #品牌等级名称
    const BRAND_LEVELS = [
        self::BRAND_LV_0 => 'Lv0',
        self::BRAND_LV_1 => 'Lv1',
        self::BRAND_LV_2 => 'Lv2',
        self::BRAND_LV_3 => 'Lv3',
        self::BRAND_LV_4 => 'Lv4',
        self::BRAND_LV_5 => 'Lv5',
        self::BRAND_LV_6 => 'Lv6',
        self::BRAND_LV_7 => 'Lv7',
    ];

    #品牌等级成长值范围
    const BRAND_LV_GROWTH_VALUE_RANGE = [
        self::BRAND_LV_0 => [0, 99],
        self::BRAND_LV_1 => [100, 1249],
        self::BRAND_LV_2 => [1250, 3899],
        self::BRAND_LV_3 => [3900, 9849],
        self::BRAND_LV_4 => [9850, 20349],
        self::BRAND_LV_5 => [20350, 38999],
        self::BRAND_LV_6 => [39000, 68049],
        self::BRAND_LV_7 => [68050, 99999],
    ];

    #客户端等级图标
    const BRAND_LEVEL_ICONS = [
        self::BRAND_LV_0 => 'https://img.haohaozhu.cn/Op-imageShow/00d8f303l01608l00ramh82?iv=1',
        self::BRAND_LV_1 => 'https://img.haohaozhu.cn/Op-imageShow/68386303l0160U600ramh82?iv=1',
        self::BRAND_LV_2 => 'https://img.haohaozhu.cn/Op-imageShow/c3314303l01609A00ramh82?iv=1',
        self::BRAND_LV_3 => 'https://img.haohaozhu.cn/Op-imageShow/716e5303l0160bk00ramh83?iv=1',
        self::BRAND_LV_4 => 'https://img.haohaozhu.cn/Op-imageShow/d9c87303l0160Re00ramh83?iv=1',
        self::BRAND_LV_5 => 'https://img.haohaozhu.cn/Op-imageShow/e6f8c303l01608a00ramh83?iv=1',
        self::BRAND_LV_6 => 'https://img.haohaozhu.cn/Op-imageShow/2e0ab303l0160Yp00ramh83?iv=1',
        self::BRAND_LV_7 => 'https://img.haohaozhu.cn/Op-imageShow/21e61303l0160Jl00ramh83?iv=1',
    ];

    #品牌后台等级图标
    const BRAND_MLEVEL_ICONS = [
        self::BRAND_LV_0 => 'https://img.haohaozhu.cn/Op-imageShow/3ce94308c06o0yN00raizr9?iv=1',
        self::BRAND_LV_1 => 'https://img.haohaozhu.cn/Op-imageShow/a5344308c06o0Hu00raizr9?iv=1',
        self::BRAND_LV_2 => 'https://img.haohaozhu.cn/Op-imageShow/0093e308c06o0gm00raizra?iv=1',
        self::BRAND_LV_3 => 'https://img.haohaozhu.cn/Op-imageShow/39515308c06o06w00raizra?iv=1',
        self::BRAND_LV_4 => 'https://img.haohaozhu.cn/Op-imageShow/57a70308c06o0aJ00raizrb?iv=1',
        self::BRAND_LV_5 => 'https://img.haohaozhu.cn/Op-imageShow/75ac7308c06o0Sv00raizrb?iv=1',
        self::BRAND_LV_6 => 'https://img.haohaozhu.cn/Op-imageShow/491aa308c06o0gr00raizrb?iv=1',
        self::BRAND_LV_7 => 'https://img.haohaozhu.cn/Op-imageShow/04300308c06o0AK00raizr9?iv=1',
    ];

    #顶级
    const BRAND_LEVEL_TOP = self::BRAND_LV_7;

    const TOP_LEVEL_YES = 1;

    const TOP_LEVEL_NO = 0;

    #等级权益保留时间day
    const LEVEL_RIGHTS_RESERVE_DAYS = 30;

    #等级权益类型获取条件文案
    const LEVEL_RIGHTS_TYPE_CONDITIONS = [
        mBrandRightsSource::RIGHTS_TYPE_OPEN => '%s开始｜可获得此项权益。',
        mBrandRightsSource::RIGHTS_TYPE_LIMIT_NUM => '%s｜可获得此权益 %d次。',
        mBrandRightsSource::RIGHTS_TYPE_NUM => '%s｜此权益升级为 %d。',
    ];

    /**
     * 内容投放类型获取条件文案
     */
    const PUT_CONTENT_CONDITIONS = [
        self::BRAND_LV_1 => '%s | 可获得9.5折劵 %d张。',
        self::BRAND_LV_2 => '%s | 可获得9折劵 %d张。',
        self::BRAND_LV_3 => '%s | 可获得8.5折劵 %d张。',
        self::BRAND_LV_4 => '%s | 可获得8折劵 %d张。',
        self::BRAND_LV_5 => '%s | 可获得7.5折劵 %d张。',
        self::BRAND_LV_6 => '%s | 可获得7折劵 %d张。',
        self::BRAND_LV_7 => '%s | 可获得6折劵 %d张。',
    ];

    #升级权益弹窗
    const LEVEL_RIGHTS_ALERT = [
        self::BRAND_LV_1 => ['user_recommend', 'index_points', 'blind_box'],
        self::BRAND_LV_2 => ['time_publish', 'data_weekly', 'index_points', 'blind_box'],
        self::BRAND_LV_3 => ['community_promotion', 'new_product', 'index_points'],
        self::BRAND_LV_4 => ['content_receive', 'score_shopping_mall', 'community_promotion', 'index_points'],
        self::BRAND_LV_5 => ['goods_test_A', 'community_promotion', 'new_product', 'content_receive'],
        self::BRAND_LV_6 => ['custom_promotion', 'goods_test_A', 'new_product', 'content_receive'],
        self::BRAND_LV_7 => ['official_accounts_promotion', 'custom_promotion', 'goods_test_A', 'content_receive'],
    ];

    #升级弹窗图片
    const UPGRADE_REMINDER = [
        self::BRAND_LV_1 => 'https://img.haohaozhu.cn/Op-imageShow/5167230ol0sc0tf00rmk6w0?iv=1',
        self::BRAND_LV_2 => 'https://img.haohaozhu.cn/Op-imageShow/8418f30oo0sc0m200rmk6w0?iv=1',
        self::BRAND_LV_3 => 'https://img.haohaozhu.cn/Op-imageShow/b1a8030ol0sc0g700rmx8on?iv=1',
        self::BRAND_LV_4 => 'https://img.haohaozhu.cn/Op-imageShow/e496e30ol0sc09y00rmk6s2?iv=1',
        self::BRAND_LV_5 => 'https://img.haohaozhu.cn/Op-imageShow/f9a4230oo0sc0UM00rmk6zz?iv=1',
        self::BRAND_LV_6 => 'https://img.haohaozhu.cn/Op-imageShow/7205630ol0sc0RI00rmk6qy?iv=1',
        self::BRAND_LV_7 => 'https://img.haohaozhu.cn/Op-imageShow/97dcd30ol0sc0DW00rmx6zh?iv=1',
    ];

    #可留资消费等级权益
    const LEAVE_INFO_CONSUME_LEAVEL_RIGHTS = [
        'community_promotion',
        'score_shopping_mall',
        'custom_promotion',
        'official_accounts_promotion',
        'put_content',
        'collect_content',
        'give_coupon',
        'flow_content'
    ];

    #含有去使用按钮的权益
    const SCENE_LINK = 1; // 跳转
    const SCENE_BTN = 2;  // 按钮操作
    const SCENE_NONE = 3;   // 无

    const SHOW_USE_BTN_LEVEL_RIGHTS = [
        'blind_box' => [
            'platform' => ['brand'],
            'link' => 'https://brand.haohaozhu.cn/activity/blind-box/list-table',
            'scene' => self::SCENE_LINK,
        ],
        'time_publish' => [
            'platform' => ['app'],
            'link' => 'niceliving://editor/create?protego={"type":"","act_from":""}',
            'scene' => self::SCENE_LINK,
        ],
        'community_promotion' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'new_product' => [
            'platform' => ['brand'],
            'link' => 'https://brand.haohaozhu.cn/activity/blind-box/product-express',
            'scene' => self::SCENE_LINK,
        ],
        'score_shopping_mall' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'goods_test_A' => [
            'platform' => ['brand'],
            'link' => 'https://brand.haohaozhu.cn/activity/blind-box/article-test',
            'scene' => self::SCENE_LINK,
        ],
        'custom_promotion' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'to_buy_show' => [
            'platform' => ['brand'],
            'link' => 'https://brand.haohaozhu.cn/data-center-2',
            'scene' => self::SCENE_LINK,
        ],
        'official_accounts_promotion' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'content_receive' => [
            'platform' => ['brand'],
            'link' => 'https://brand.haohaozhu.cn/content-pond/claim',
            'scene' => self::SCENE_LINK,
        ],
        'put_content' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'collect_content' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'give_coupon' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
        'flow_content' => [
            'platform' => ['app', 'brand'],
            'link' => '',
            'scene' => self::SCENE_BTN,
        ],
    ];

}